﻿using TaskManager.Domain.BusinessObjects;

namespace TaskManager.Domain.Services
{
    /// <summary>
    /// Interface for logging user actions
    /// </summary>
    public interface IUserActionLogger
    {
        /// <summary>
        /// Logs task reassignment
        /// </summary>
        /// <param name="task">Task</param>
        /// <param name="oldAssignee">Old assignee</param>
        /// <param name="newAssignee">New assignee</param>
        void LogReassignTask(Task task, string oldAssignee, string newAssignee);

        /// <summary>
        /// Logs event when owner of a task was changed
        /// </summary>
        /// <param name="task">Task</param>
        /// <param name="oldOwner">Old owner</param>
        /// <param name="newOwner">New owner</param>
        void LogChangeTaskOwner(Task task, string oldOwner, string newOwner);
        
        /// <summary>
        /// Logs task start event
        /// </summary>
        /// <param name="task">Task</param>
        void LogStartTask(Task task);
        
        /// <summary>
        /// Logs task delete event
        /// </summary>
        /// <param name="project">Project</param>
        /// <param name="taskSummary">Task summary</param>
        void LogDeleteTask(Project project, string taskSummary);
        
        /// <summary>
        /// Logs task creation
        /// </summary>
        /// <param name="task">Task</param>
        void LogCreateTask(Task task);
        
        /// <summary>
        /// Logs project creation
        /// </summary>
        /// <param name="project">Project</param>
        void LogCreateProject(Project project);
        
        /// <summary>
        /// Logs project close event
        /// </summary>
        /// <param name="project">Project</param>
        void LogCloseProject(Project project);

        /// <summary>
        /// Logs project reopen event
        /// </summary>
        /// <param name="project">Project</param>
        void LogReopenProject(Project project);

        /// <summary>
        /// Logs event when new comment was added to task
        /// </summary>
        /// <param name="task">Task</param>
        /// <param name="comment">Comment</param>
        void LogAddComment(Task task, Comment comment);
        
        /// <summary>
        /// Logs task completion
        /// </summary>
        /// <param name="task"></param>
        void LogCompleteTask(Task task);

        /// <summary>
        /// Logs task reopen operation
        /// </summary>
        /// <param name="task"></param>
        void LogReopenTask(Task task);
    }
}